package com.changgou.order.pojo;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.Min;
import java.io.Serializable;

/**
 * orderItem实体类
 * @author 黑马架构师2.5
 *
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name="tb_order_item")
public class OrderItem implements Serializable {

	@Id
	private String id;//ID
	private Integer categoryId1;//1级分类
	private Integer categoryId2;//2级分类
	private Integer categoryId3;//3级分类
	private String spuId;//SPU_ID
	private String skuId;//SKU_ID
	private String orderId;//订单ID
	private String name;//商品名称
	private Integer price;//单价
	@Min(value = 1,message = "购物车数量不能少于1；")
	private Integer num;//数量
	@Min(value = 0,message = "金额不能为负数")
	private Integer money;//总金额
	private Integer payMoney;//实付金额
	private String image;//图片地址
	private Integer weight;//重量
	private Integer postFee;//运费
	private String isReturn;//是否退货
}
